package weborb.gcf.security;

import weborb.security.IAuthorizationHandler;
import weborb.security.ORBSecurity;

public class AuthorizationHandler implements IAuthorizationHandler {
	public boolean authorizeAccess( String resource, ORBSecurity security )
	{
		System.out.println(resource + " " + security );
		if ( resource.equals("weborb.gcf.InfoService#getInfo") )
			return true;
		if ( resource.startsWith("weborb.gcf") ) {
			String users[] = ORBSecurity.getRoles();
			
			for(int i=0;i<users.length;i++)
				System.out.println(users[i]);
			return true;
		}
		return true;
	}
}
